﻿using System;
using System.Collections.Generic;
using System.Text;
using DAL;
using System.Data;

namespace BLL
{
    public class ConsumableRecordManage
    {
        /// <summary>
        /// 增加一条数据
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public static bool Add(Model.ConsumableRecord model)
        {
            return ConsumableRecordService.Add(model);
            
        }

        /// <summary>
        /// 删除一条数据ByID
        /// </summary>
        /// <param name="id"></param>
        public static void Delete(int id)
        {
            ConsumableRecordService.Delete(id);
        }

        /// <summary>
        /// 删除记录数据ByCID
        /// </summary>
        /// <param name="id"></param>
        public static void DeleteByCID(int cid)
        {
            ConsumableRecordService.DeleteByCID(cid);
        }

        /// <summary>
        /// 更新一条数据
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public static bool Update(Model.ConsumableRecord model)
        {
            return ConsumableRecordService.Update(model);
        }

        /// <summary>
        /// 获取一条数据byID
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public static Model.ConsumableRecord SelectOneByID(int id)
        {
            return ConsumableRecordService.SelectOneByID(id);
        }

        /// <summary>
        /// 获取列表
        /// </summary>
        /// <param name="strWhere"></param>
        /// <returns></returns>
        public static DataSet GetList(string strWhere = "")
        {
            return ConsumableRecordService.GetList(strWhere);
        }
    }
}
